import http from '@/utils/fetch'

// 蚂蚁链——商品上链
export function twcProduct(params) {
  return http.post('/Admin/Twc/alipayTWCProduct', params)
}

// 蚂蚁链——商品查询
export function twcProductGet(params) {
  return http.post('/Admin/Twc/alipayTWCProductGet', params)
}

// 蚂蚁链——用户信息查询
export function twcUserGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetUser', params)
}

// 蚂蚁链——订单信息查询
export function twcGetOrderGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetOrder', params)
}

// 蚂蚁链——订单商品查询
export function twcGetOrderProductGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetOrderProduct', params)
}

// 蚂蚁链——物流查询
export function twcGetLogisticGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetLogistic', params)
}

// 蚂蚁链——承诺查询
export function twcLeasePromiseGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetLeasePromise', params)
}

// 蚂蚁链——履约查询
export function twcRentalGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetRental', params)
}

// 蚂蚁链——投保查询
export function twcInsuranceGet(params) {
  return http.post('/Admin/Twc/alipayTWCGetInsurance', params)
}

export function alipayTWCSm(params) {
  return http.post('/Admin/Twc/alipayTWCSm', params)
}

// 获取一级行业枚举
export function getMainClass() {
  return [
    {
      value: '3C',
      label: '3C办公'
    },
    {
      value: 'IOT',
      label: 'IOT'
    },
    {
      value: 'NE',
      label: '新能源'
    },
    {
      value: 'GENERAL',
      label: '泛行业'
    }
  ]
}

// 获取一级行业枚举
export function getSubClass() {
  return {
    '3C': [
      {
        value: '3c_mobile',
        label: '手机'
      },
      {
        value: '3c_pc',
        label: '电脑'
      },
      {
        value: '3c_camera',
        label: '摄影'
      },
      {
        value: '3c_office',
        label: '办公设备'
      },
      {
        value: '3c_other',
        label: '3C-其他'
      }
    ],
    'IOT': [
      {
        value: 'iot_auto_container',
        label: '售卖柜'
      },
      {
        value: 'iot_stage',
        label: '驿站'
      },
      {
        value: 'iot_other',
        label: 'IOT-其他'
      }
    ],
    'NE': [
      {
        value: 'ne_battery',
        label: '电池'
      },
      {
        value: 'ne_electric_car',
        label: '电动车'
      },
      {
        value: 'ne_other',
        label: '新能源-其他'
      }
    ],
    'GENERAL': [
      {
        value: 'general_furniture',
        label: '家具'
      },
      {
        value: 'general_tv',
        label: '家电'
      },
      {
        value: 'general_other',
        label: '泛其他'
      }
    ]
  }
}

// 获取存储的蚂蚁链数据
export function getTWCLog(params) {
  return http.get('/Admin/Order/getTWCLog', params)
}

export function callbackTest(params) {
  // return http.post('/Alipay/Notice/preAuthNotify', params)
  return http.post('/Supplier/Account/rechargeQuery', params)
}
